<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%

	String path = request.getContextPath();
	System.out.print(path);
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("ctx",basePath);
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>电商管理系统</title>

<link href="${ctx }/ui/assets/css/login.css" rel="stylesheet"
	rev="stylesheet" type="text/css" media="all" />

<link href="${ctx }/ui/assets/css/demo.css" rel="stylesheet"
	rev="stylesheet" type="text/css" media="all" />

<script type="text/javascript"
	src="${ctx }/ui/assets/js/jquery1.42.min.js"></script>

<script type="text/javascript"
	src="${ctx }/ui/assets/js/jquery.SuperSlide.js"></script>

<script type="text/javascript"
	src="${ctx }/ui/assets/js/Validform_v5.3.2_min.js"></script>



<script>
	$(function() {
		debugger;
		$(".i-text").focus(function() {

			$(this).addClass('h-light');

		});

		$(".i-text").focusout(function() {

			$(this).removeClass('h-light');

		});

		$("#username").focus(function() {

			var username = $(this).val();

			if (username == '输入账号') {

				$(this).val('');

			}

		});

		$("#username").focusout(function() {

			var username = $(this).val();

			if (username == '') {

				$(this).val('输入账号');

			}

		});

		$("#password").focus(function() {

			var username = $(this).val();

			if (username == '输入密码') {

				$(this).val('');

			}

		});

		$("#yzm").focus(function() {

			var username = $(this).val();

			if (username == '输入验证码') {

				$(this).val('');

			}

		});

		$("#yzm").focusout(function() {

			var username = $(this).val();

			if (username == '') {

				$(this).val('输入验证码');

			}

		});

		$(".registerform").Validform({

			tiptype : function(msg, o, cssctl) {

				var objtip = $(".error-box");

				cssctl(objtip, o.type);

				objtip.text(msg);

			}
		});

	});
</script>





</head>



<body>





	<div class="header">

		<h1 class="headerLogo">
			<a title="电商管理系统" target="_blank" href="javascript:"><img
				alt="logo" src="${ctx }/ui/assets/images/logo.png"></a>
		</h1>

		<div class="headerNav">
			<a target="_blank" href="#"></a>
		</div>

	</div>



	<div class="banner">



		<div class="login-aside">

			<div id="o-box-up"></div>

			<div id="o-box-down" style="table-layout: fixed;">

				<div class="error-box"></div>

				<form class="registerform" action="adminlogin.action">
					<div class="messages">
						<div style="display: none;" id="message-error"
							class="message message-error">
							<div class="image">
								<img
									src="<%=basePath%>admin/ui/assets/img/header/icon-48-alert.png"
									alt="Error" height="32" /> <span>您输入的用户名或者密码错误</span>
							</div>
						</div>
					</div>
					<div class="fm-item">

						<label for="logonId" class="form-label">MISS系统登陆：</label> <input
							type="text" value="输入账号" maxlength="100" id="username" name="username"
							class="i-text"  datatype="s6-18"
							errormsg="用户名至少6个字符,最多18个字符！">
						<div class="ui-form-explain"></div>
					</div>
					<div class="fm-item">

						<label for="logonId" class="form-label">登陆密码：</label> <input
							type="password" value="" maxlength="100" id="password" name="password"
							class="i-text" datatype="*6-16" nullmsg="请设置密码！"
							errormsg="密码范围在6~16位之间！">

						<div class="ui-form-explain"></div>

					</div>



					<%-- <div class="fm-item pos-r">

						<label for="logonId" class="form-label">验证码</label> <input
							type="text" value="输入验证码" maxlength="100" id="yzm"
							class="i-text yzm" nullmsg="请输入验证码！">

						<div class="ui-form-explain">
							<img src="${ctx }/ui/assets/images/yzm.jpg" class="yzm-img" />
						</div>

					</div> --%>



					<div class="fm-item">

						<label for="logonId" class="form-label"></label> <input
							type="submit" value="" tabindex="4" id="send-btn"
							class="btn-login">

						<div class="ui-form-explain"></div>

					</div>



				</form>



			</div>



		</div>



		<div class="bd">

			<ul>

				<li
					style="background: url(${ctx}/ui/assets/themes/theme-pic1.jpg) #CCE1F3 center 0 no-repeat;"><a
					target="_blank" href="javascript:"></a></li>

				<li
					style="background: url(${ctx}/ui/assets/themes/theme-pic2.jpg) #BCE0FF center 0 no-repeat;"><a
					target="_blank" href="javascript:"></a></li>

			</ul>

		</div>



		<div class="hd">
			<ul></ul>
		</div>

	</div>

	<script type="text/javascript">
		jQuery(".banner").slide({
			titCell : ".hd ul",
			mainCell : ".bd ul",
			effect : "fold",
			autoPlay : true,
			autoPage : true,
			trigger : "click"
		});
	</script>

	<div class="banner-shadow"></div>

<%
    String msg  = 	request.getParameter("msg");
	request.setAttribute("msg", msg);
%>

<script type="text/javascript">
	$(function() {
		//读取登录返回状态并显示提示
		var msg = "${msg}";
		if ("1" == msg) {
			$("#message-error").show();
		} else {
			$("#message-error").hide();
		}
	});
	</script>


</body>

</html>